home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / webmaste / csehtmlp / csehtmlp.exe / {app} / ParserRules / ms_dosbl.xs < prev    next >
Encoding:
Text File  |  2002-04-22  |  2.0 KB  |  68 lines

  1. //Language: MS Dos batch
  2. //Copyright (c) 1992-2002 Altium Limited             
  3. //All rights reserved.                               
  4. //http://www.dream-com.com                           
  5. //contact@dream-com.com                              
  6.  
  7. // states
  8. State=snormal
  9. State=sstring
  10. State=scomment1
  11. State=scomment2
  12. // tokens
  13. Token=tnone
  14. Token=tstring
  15. Token=tcomment
  16. Token=tident
  17. Token=tinteger
  18. Token=tfloat
  19. Token=tresword
  20. Token=tassembler
  21. Token=turl
  22. Token=twhitespace
  23. Token=tdirective
  24. //delims
  25. Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/
  26.  
  27. // reswords
  28. snormal 'call'       snormal tresword
  29. snormal 'do'         snormal tresword
  30. snormal 'echo'       snormal tresword
  31. snormal 'errorlevel' snormal tresword
  32. snormal 'exist'      snormal tresword
  33. snormal 'for'        snormal tresword
  34. snormal 'goto'       snormal tresword
  35. snormal 'if'         snormal tresword
  36. snormal 'in'         snormal tresword
  37. snormal 'not'        snormal tresword
  38. snormal 'pause'      snormal tresword
  39. //snormal 'rem'        snormal tresword
  40. snormal 'set'        snormal tresword
  41. snormal 'shift'      snormal tresword
  42.  
  43. // numbers
  44. snormal [1-9][0-9]*                            snormal  tinteger
  45. snormal [1-9][0-9]*\.[0-9]*                    snormal  tfloat
  46. snormal [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ snormal  tfloat
  47.  
  48. //idents
  49. snormal   [a-z_A-Z][a-z_A-Z0-9]*  snormal   tident
  50.  
  51. //white space
  52. snormal #32*                      snormal   twhitespace
  53.  
  54. //comments
  55. snormal     rem[^#33-#255]          scomment1  tcomment
  56. scomment1   [#1-#255]*              snormal    tcomment
  57. scomment1   $                       snormal    tcomment
  58.  
  59. snormal     \:                      scomment2  tcomment
  60. scomment2   [#1-#255]*              snormal    tcomment
  61. scomment2   $                       snormal    tcomment
  62.  
  63. //strings
  64. snormal   \"                     sstring   tstring
  65. sstring   [^\"]*                 sstring   tstring
  66. sstring   \"                     snormal   tstring
  67. sstring   $                      snormal   tstring
  68.